package com.iot.websocket.message;

import com.alibaba.fastjson.JSONObject;
import com.iot.common.enums.BizCode;
import com.iot.websocket.Topic;
import com.iot.websocket.WebSocketMessage;

public class DeviceStatusMessage extends WebSocketMessage {

    private String clientNo;

    public DeviceStatusMessage() {
        this.setBizCode(BizCode.COMMON.getCode());
    }

    public static DeviceStatusMessage getInstance(String clientNo, JSONObject data){
        DeviceStatusMessage instance = new DeviceStatusMessage();
        instance.clientNo = clientNo;
        instance.setTopic(Topic.DEVICE_STATUS);
        instance.setData(data);
        return instance;
    }

    public String getClientNo() {
        return this.clientNo;
    }
}
